package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.mtorder.*;
import com.uzai.console.service.feign.impl.MtOrderFeignFallbackFactory;
import com.uzai.console.vo.locallive.mtorder.feign.MtOrderBindVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-order-server", fallbackFactory = MtOrderFeignFallbackFactory.class)
public interface MtOrderFeignService {

    /**
     * 美团订单确认收货
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param mtOrderSettledDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/settled/mt/order")
    UzaiRespVo<Object> settled(@RequestBody MtOrderSettledDto mtOrderSettledDto);

    /**
     * 美团订单解冻
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param mtOrderUnfreezeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unfreeze/mt/sync")
    UzaiRespVo<Object> unfreeze(@RequestBody MtOrderUnfreezeDto mtOrderUnfreezeDto);

    /**
     * 美团订单解绑用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param mtOrderUnbindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unbind/mt/sync")
    UzaiRespVo<Object> unbind(@RequestBody MtOrderUnbindDto mtOrderUnbindDto);

    /**
     * 美团订单绑定用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param mtOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/mt/async")
    UzaiRespVo<Object> bind(@RequestBody MtOrderBindDto mtOrderBindDto);

    /**
     * 美团订单拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param mtOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/pull/mt/orderByToken")
    UzaiRespVo<Object> pull(@RequestBody MtOrderPullDto mtOrderPullDto);
}
